import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/harry";

// 查询客户分页列表
export function listCuser(params) {
  return request({
    url: '/sys/cuser/pageList',
    method: 'get',
    params: params
  })
}

// 新增与修改客户 无id新增有id编辑
export function saveOrUpdateCuser(data) {
  return request({
    url: '/sys/cuser/saveOrUpdate',
    method: 'post',
    data: data
  })
}
// 删除客户
export function delCuser(id) {
  return request({
    url: '/sys/cuser/delete/' + id,
    method: 'delete'
  })
}
// 拉黑客户
export function blackCuser(userId,data) {
  return request({
    url: '/sys/cuser/pageList/black/' + userId,
    method: 'put',
    data: data
  })
}
// 取消拉黑客户
export function unBlackCuser(userId) {
  return request({
    url: '/sys/cuser/pageList/black/un/' + userId,
    method: 'put',
  })
}
